package com.scy.boot04test03.mapper;

import com.scy.boot04test03.entity.Stu;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface StuMapper {

    @Insert("insert into stu values(null,#{name},#{gender},#{age},#{address})")
    void insert(Stu stu);

    @Select("select * from stu")
    List<Stu> select();

    @Delete("delete from stu where id=#{id}")
    void delete(int id);

    @Update("update stu set name=#{name},gender=#{gender},age=#{age},address=#{address} where id=#{id}")
    void update(Stu stu);
}
